<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <link href="../css/home.css" type="text/css" rel="stylesheet"/>
    <script charset="UTF-8" language="javascript"  type="text/javascript"  src="../js/apiPage.js"></script>
    <script charset="UTF-8" language="javascript"  type="text/javascript"  src="../js/home.js"></script>
    <link href="../css/bootstrap3.3.6.min.css" rel="stylesheet">
    <script src="../js/jquery2.1.1.min.js"></script>
    <script src="../js/bootstrap.min.js"></script>
</head>
<body onload="initializeData()">
    <div class="bottom">
        <div class="filter">
            <div>
                <label>所属项目:</label>
                <select name="project" id="project" title="所属项目" onchange=""></select>
            </div>

            <div>
                <label>请求方式:</label>
                <select name="method" id="method" title="请求方式" onchange=""></select>
            </div>

            <div>
                <label for="path">接口路径:</label>
                <input title="" id="path" type="text"/>
            </div>

            <div style="width: 100%">
                <label>版本所属:</label>
                <select name="version" id="version" title="版本所属" onchange=""></select>
                <div style="float: right">
                    <button title="红色:返回4xx 或5xx; 黑色:找不到地址； 蓝色:请求超时30秒；黄色:json状态码不符合预期，非json返回跳过这层验证；绿色:全部通过" onclick="checkHealth()">健康检查</button>
                    <button onclick="queryApi()">查询</button>
                    <button onclick="controlTopDiv('open', '添加接口')">添加</button>
                </div>
            </div>


        </div>
        <div class="content">
            <table id="infoTable" border="1" style="border-collapse: collapse; width: 100%; text-align: left">
                <tbody>
                <tr>
                    <th>method</th>
                    <th>api path</th>
                    <th>parameter</th>
                    <th>project</th>
                    <th>version</th>
                    <th>expect response</th>
                    <th>describe</th>
                    <th>isHealth</th>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="topDiv1000" id="add&edit" style="display: none;">
        <div class="topDiv1001 api">
            <div style="width: 100%">
                <label class="topDivTitle" id="topDivTitle"></label>
                <label class="close" onclick="controlTopDiv('close', '')">X</label>
            </div>
            <div style="width: 100%; padding: 0 20px 0 20px; text-align: center">
                <div id="apiId" style="display: none;"></div>

                <div>
                    <label>请求方式:</label>
                    <select id="topDivMethod" title="请求方式"></select>
                </div>
                <div>
                    <label>所属项目:</label>
                    <select id="topDivProject" title="所属项目"></select>
                </div>
                <div>
                    <label>版本所属:</label>
                    <input  id="topDivVersion" title="版本所属" type="text"/>
                </div>
                <div>
                    <label>域名地址:</label>
                    <input id="topDivDomain" title="域名地址-可以带端口号" placeholder="可以带端口号" type="text"/>
                </div>
                <div>
                    <label>接口描述:</label>
                    <input title="" id="topDivDescribe" type="text"/>
                </div>
                <div>
                    <label>接口路径:</label>
                    <textarea id="topDivPath" placeholder=""></textarea>
                </div>

                <div>
                    <label>头部信息:</label>
                    <textarea id="topDivHeader" placeholder="必须是正确的json格式"></textarea>
                </div>
                <div>
                    <label>请求参数:</label>
                    <textarea id="topDivParameter" placeholder="必须是正确的json格式"></textarea>
                </div>
                <div>
                    <label>返回参数:</label>
                    <textarea id="topDivResponse" placeholder="必须是正确的json格式,返回头也包括在其中"></textarea>
                </div>
                <button class="topDivSaveButton" onclick="saveApi()">保存</button>
            </div>

        </div>
    </div>
</body>
</html>